home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0089-Mac Plus specific b-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-16  |  1.4 KB  |  42 lines  |  [TEXT/GEOL]

  1. Item    2174053                         16-Oct-89        11:47
  2.  
  3. From:   MID                             France, M.I.D.
  4.  
  5. To:     D2652                           Strategic Planning Sys, D Bell,PRT
  6.         MACAPP.TECH$                    MACAPP Tech
  7.  
  8. Sub:    Mac Plus specific bug
  9.  
  10. Hi DannyC and other MacAppers,
  11.  
  12. I have fixed a MacPlus specific bug (not really a MacApp Bug but in fact a ROM
  13. bug):
  14.  
  15. My application was OK on a Color QuickDraw machine but crashed about a few
  16. minutes on Mac Plus or Mac SE. The problem was in the TrackCursor mechanism of
  17. MacApp.
  18.  
  19. The TApplication.TrackCursor method uses DiffRgn trap with an initial parameter
  20. set to an "infinite" region:
  21. SetRectRgn(gCursorRgn, - maxint, - maxint, maxint, maxint);
  22.  
  23. Under MacsBug, if the parameters region are:
  24. rgnA: 000A 8001 8001 7FFF 7FFF 8000 0078 0000
  25. rgnB: 000A 0032 0014 00F2 0087 8000 0012 0000
  26. dstRgn: 000A 8001 8001 7FFF 7FFF 8000 0078 0000
  27. with the old QuickDraw (Mac Plus or SE and perhaps Portable...) the result for
  28. dstRgn is:
  29. 0548 8001 8001 00F2 7FFF 8001 8001 7FFF
  30. (^ Ooops !!! this is a very big size for a region !!!)
  31. and the next use of this region will crash.
  32.  
  33. My fix is to use a "semi-infinite" value for initial region:
  34. SetRectRgn(gCursorRgn, - maxint DIV 2, - maxint DIV 2 , maxint DIV 2 , maxint
  35. DIV 2 );
  36.  
  37. I have already reported this bug many months ago, but I have no echo. So, it
  38. seems that I am the unique victim of this old ROM bug.
  39.  
  40. Etienne Vautherin
  41.  
  42.